package org.jeecg.modules.engineering.mapper;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.SqlParser;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.engineering.entity.EquipCollectRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
 * @Description: 设备与采集项关系表
 * @Author: jeecg-boot
 * @Date:   2019-08-27
 * @Version: V1.0
 */
@Repository
public interface EquipCollectRelationMapper extends BaseMapper<EquipCollectRelation> {

    @SqlParser(filter = true)
    void insertBatch(@Param("relations") List<EquipCollectRelation> relations);

    @SqlParser(filter = true)
    List<JSONObject> queryDataByCode(@Param("itemCode") String itemCode,@Param("collectorCode") String collectorCode);


    void deleteByEquipId(Map<String,Object> params);

    List<String> getItemListByEquipId(@Param("equipId")String equipId);

    @SqlParser(filter = true)
    long selectCountByItemIds(@Param("ids") List<String> ids, @Param("size")int size);
}
